import {request, handleFetchResultNotification, REQUEST_TYPE} from '../utils';
import stringify from 'Shared/utils/stringify';
import {formatMessage} from './intl';
const baseUrl = '/parts/api/v1';

const getListDesc = formatMessage({
    id: 'api.message.getListDesc',
    defaultMessage: '查询备件出口销量报表'
});
// 查询12个总代数据需要有后台配置表
export const getInit = pageOption => {
    const queryString = stringify(pageOption);
    return request(`${baseUrl}/ui/PartExportSales/init?${queryString}`, null, null)
        .then(handleFetchResultNotification(REQUEST_TYPE.query, getListDesc));
};
